Optimal. Leaf size=255 \[ \frac{i b e^{i c} (f+g x)^2 \left (-i d (f+g x)^n\right )^{-2/n} \text{Gamma}\left (\frac{2}{n},-i d (f+g x)^n\right )}{2 g^2 n}-\frac{i b e^{i c} f (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},-i d (f+g x)^n\right )}{2 g^2 n}+\frac{i b e^{-i c} f (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},i d (f+g x)^n\right )}{2 g^2 n}-\frac{i b e^{-i c} (f+g x)^2 \left (i d (f+g x)^n\right )^{-2/n} \text{Gamma}\left (\frac{2}{n},i d (f+g x)^n\right )}{2 g^2 n}+\frac{a x^2}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.191521, antiderivative size = 255, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {14, 3433, 3365, 2208, 3423, 2218} \[ \frac{i b e^{i c} (f+g x)^2 \left (-i d (f+g x)^n\right )^{-2/n} \text{Gamma}\left (\frac{2}{n},-i d (f+g x)^n\right )}{2 g^2 n}-\frac{i b e^{i c} f (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},-i d (f+g x)^n\right )}{2 g^2 n}+\frac{i b e^{-i c} f (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},i d (f+g x)^n\right )}{2 g^2 n}-\frac{i b e^{-i c} (f+g x)^2 \left (i d (f+g x)^n\right )^{-2/n} \text{Gamma}\left (\frac{2}{n},i d (f+g x)^n\right )}{2 g^2 n}+\frac{a x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 3433
Rule 3365
Rule 2208
Rule 3423
Rule 2218
Rubi steps
\begin{align*} \int x \left (a+b \sin \left (c+d (f+g x)^n\right )\right ) \, dx &=\int \left (a x+b x \sin \left (c+d (f+g x)^n\right )\right ) \, dx\\ &=\frac{a x^2}{2}+b \int x \sin \left (c+d (f+g x)^n\right ) \, dx\\ &=\frac{a x^2}{2}+\frac{b \operatorname{Subst}\left (\int \left (-f \sin \left (c+d x^n\right )+x \sin \left (c+d x^n\right )\right ) \, dx,x,f+g x\right )}{g^2}\\ &=\frac{a x^2}{2}+\frac{b \operatorname{Subst}\left (\int x \sin \left (c+d x^n\right ) \, dx,x,f+g x\right )}{g^2}-\frac{(b f) \operatorname{Subst}\left (\int \sin \left (c+d x^n\right ) \, dx,x,f+g x\right )}{g^2}\\ &=\frac{a x^2}{2}+\frac{(i b) \operatorname{Subst}\left (\int e^{-i c-i d x^n} x \, dx,x,f+g x\right )}{2 g^2}-\frac{(i b) \operatorname{Subst}\left (\int e^{i c+i d x^n} x \, dx,x,f+g x\right )}{2 g^2}-\frac{(i b f) \operatorname{Subst}\left (\int e^{-i c-i d x^n} \, dx,x,f+g x\right )}{2 g^2}+\frac{(i b f) \operatorname{Subst}\left (\int e^{i c+i d x^n} \, dx,x,f+g x\right )}{2 g^2}\\ &=\frac{a x^2}{2}-\frac{i b e^{i c} f (f+g x) \left (-i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac{1}{n},-i d (f+g x)^n\right )}{2 g^2 n}+\frac{i b e^{-i c} f (f+g x) \left (i d (f+g x)^n\right )^{-1/n} \Gamma \left (\frac{1}{n},i d (f+g x)^n\right )}{2 g^2 n}+\frac{i b e^{i c} (f+g x)^2 \left (-i d (f+g x)^n\right )^{-2/n} \Gamma \left (\frac{2}{n},-i d (f+g x)^n\right )}{2 g^2 n}-\frac{i b e^{-i c} (f+g x)^2 \left (i d (f+g x)^n\right )^{-2/n} \Gamma \left (\frac{2}{n},i d (f+g x)^n\right )}{2 g^2 n}\\ \end{align*}
Mathematica [A] time = 0.492889, size = 215, normalized size = 0.84 \[ \frac{b (\sin (c)-i \cos (c)) (f+g x) \left (-i d (f+g x)^n\right )^{-2/n} \left (f \left (-i d (f+g x)^n\right )^{\frac{1}{n}} \text{Gamma}\left (\frac{1}{n},-i d (f+g x)^n\right )-(f+g x) \text{Gamma}\left (\frac{2}{n},-i d (f+g x)^n\right )\right )}{2 g^2 n}+\frac{b (\sin (c)+i \cos (c)) (f+g x) \left (i d (f+g x)^n\right )^{-2/n} \left (f \left (i d (f+g x)^n\right )^{\frac{1}{n}} \text{Gamma}\left (\frac{1}{n},i d (f+g x)^n\right )-(f+g x) \text{Gamma}\left (\frac{2}{n},i d (f+g x)^n\right )\right )}{2 g^2 n}+\frac{a x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.151, size = 0, normalized size = 0. \begin{align*} \int x \left ( a+b\sin \left ( c+d \left ( gx+f \right ) ^{n} \right ) \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{2} \, a x^{2} + b \int x \sin \left ({\left (g x + f\right )}^{n} d + c\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b x \sin \left ({\left (g x + f\right )}^{n} d + c\right ) + a x, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x \left (a + b \sin{\left (c + d \left (f + g x\right )^{n} \right )}\right )\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sin \left ({\left (g x + f\right )}^{n} d + c\right ) + a\right )} x\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]